<?php
/**
 * @package                Joomla.Site
 * @subpackage	Templates.beez_20
 * @copyright        Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license                GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access.
defined('_JEXEC') or die;

jimport('joomla.filesystem.file');

// check modules
$pageoption = JRequest::getVar('option');
$pageview = JRequest::getVar('view');
$isHome = ($pageoption=='com_content' and $pageview=='featured');
$isArticle = ($pageoption=='com_content' and $pageview=='article');
$isContact = ($pageoption=='com_contact');
$isCategory = ($pageoption=='com_content' and $pageview=='category');
$isGallery = ($pageoption=='com_phocagallery');
$isNewsletter = ($pageoption=='com_acymailing');
$showIntro	= ($this->countModules('introduction') or $this->countModules('intro-video-text-1') or $this->countModules('intro-video-text-2') or $this->countModules('intro-video-1') or $this->countModules('intro-video-2'));
$showSections			= ($this->countModules('section-1') or $this->countModules('section-2') or $this->countModules('section-3'));
$showright			= ($this->countModules('right-column'));
$showforms			= ($this->countModules('right-forms') and ($isCategory or $isContact));

$tplclass ='';
$wrapperid ='max-download-trial';
$tplid ='download-trial-tpl';
if ($isArticle) {
	$tplclass ='col-4 col-last';
}
if ($isArticle and $showright) {
	$tplclass ='tpl-left col-3 left-content';
}
if ($isCategory or $isContact or $isNewsletter) {
	$tplclass ='col-2';
}
if ($isContact) {
	$wrapperid ='max-contact';
	$tplid ='contact-tpl';
}
JHtml::_('behavior.framework', true);

// get params
$color				= $this->params->get('templatecolor');
$logo				= $this->params->get('logo');
$navposition		= $this->params->get('navposition');
$app				= JFactory::getApplication();
$doc				= JFactory::getDocument();
$templateparams		= $app->getTemplate(true)->params;
$templatepath       = $this->baseurl.'/templates/'.$this->template;

?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>"> <!--<![endif]-->
<head>
<jdoc:include type="head" />
<link href='http://fonts.googleapis.com/css?family=Lato:400,300,300italic,900,900italic,400italic,700,700italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="<?php echo $templatepath; ?>/src/css/camera.css">
<link rel="stylesheet" href="<?php echo $templatepath; ?>/src/css/style.css">
<link rel="stylesheet" href="<?php echo $templatepath; ?>/src/css/cuong.css">
<link rel="stylesheet" href="<?php echo $templatepath; ?>/src/css/reveal.css"/>
<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/jquery-1.8.3.min.js"></script>
<script src="<?php echo $templatepath; ?>/src/js/modernizr-2.6.2-respond-1.1.0.min.js"></script>

<script type="text/javascript">
	$(function(){
    /* Hide form input values on focus*/ 
    $('input:text').each(function(){
        var txtval = $(this).val();
        $(this).focus(function(){
            if($(this).val() == txtval){
                $(this).val('')
            }
        });
        $(this).blur(function(){
            if($(this).val() == ""){
                $(this).val(txtval);
            }
        });
    });
});
jQuery(function() {
if( jQuery('#system-message dd ul li').length > 0) {
			jQuery('#alert').html(jQuery('#system-message dd ul li').html());
			jQuery('#backoverlay').show();
			jQuery('#show_popup').show();
		}
});	
</script>
<style>	
 	a {cursor:pointer;}
    .bg_alert{ width:275px; height:115px; background:url("<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/img/bg_alert.png") no-repeat top left; margin:0px auto; padding:10px 0px 0px 78px; color:#000;}
    .m35l{ margin-left:35px;}
</style>
</head>

<body>
<div id="dialog" style="display:none; position: fixed; top: 10%; left: 35%; z-index:10002;"></div>
<div class="bg_alert" id="show_popup" style="font-size:13px; display:none; position: fixed; top: 35%; left: 50%; z-index:10003; margin-left:-140px;">
    <span id="f_focus" style="display:none;"></span>
    <div style="margin:0; padding-top:0px; min-height:75px;width:260px;" id="alert"></div>
    <div style="padding-left: 40px;"><a href="javascript:void(0);" onclick="close_popup();"><img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/img/bt_luk.png" alt="" /></a></div>
</div>
<div style="display: none;position: fixed; top: 0;left: 0;width: 100%;height: 100%;background-color: #000000;z-index:10002;-moz-opacity: 0.8;opacity:.80;filter: alpha(opacity=80);" id="backoverlay"></div>	

<div id="menu-fix">
    <div class="max-container" id="max-header">
        <header class="header clearfix">
            <h2 id="logo"><a href="index.php">Logpoint</a></h2>
			<div id="flag">
				 <jdoc:include type="modules" name="language" />
				
            </div>
            <div id="nav-search">
			  <jdoc:include type="modules" name="search" />
            </div>
            <nav class="navigation clearfix">
				<jdoc:include type="modules" name="navigate" />
        	</nav>
        </header>
    </div>
    <div class="max-container" id="max-submenu">
        <!-- <div class="wrapper">
            <nav class="nav-sub clearfix">
                <ul id="submenu-1" class="submenu">
                    <li><a href="whitepaper.php">Whitepapers</a></li>
                    <li><a href="manual.php">Manuals</a></li>
                    <li><a href="edu-service.php">Educational services</a></li>
                </ul>
            </nav>
        </div> -->
    </div>
</div>

<div id="head-temp"></div>
<div class="max-slider <?php echo !$isHome?'tpl-padding':'';?>" id="<?php echo $isHome?'max-slider-homepage':'max-slider-2';?>">
	<?php if($this->countModules('slide')): ?>
	<div class="camera_wrap" id="slider-home">
		<jdoc:include type="modules" name="slide" />
	</div>
	<?php endif; ?>
	<div class="clear"></div>
	<?php if($this->countModules('banners')): ?>
	<div class="wrapper clearfix" id="top-banner1">
		<jdoc:include type="modules" name="banners" />
	</div>
	<?php endif; ?>
	<div class="clear"></div>
</div>
<?php if($showIntro): ?>
<div class="max-container tpl-padding max-lightbg" id="max-why">
	<div class="wrapper clearfix" id="homepage-tpl">
		<section id="section-why" class="clearfix">
			<div id="box-intro">
				<jdoc:include type="modules" name="introduction" />
			</div>
			<div class="clear"></div>
			
			<div class="col-1">
				<div class="video-text" id="video-left">
					<jdoc:include type="modules" name="intro-video-text-1" />
				</div>
			</div>
			<div class="col-1">
				<jdoc:include type="modules" name="intro-video-1" />
			</div>
			<div class="col-1">
				<jdoc:include type="modules" name="intro-video-2" />
			</div>
			<div class="col-1 col-last">
				<div class="video-text" id="video-right">
					<jdoc:include type="modules" name="intro-video-text-2" />
				</div>
			</div>
		</section>
	</div>
</div>
<?php endif; ?>
<div class="max-container tpl-padding max-lightbg" id="<?php echo $wrapperid; ?>">
  <div class="wrapper clear-fix" id="<?php echo $tplid; ?>">
    <div class="<?php echo $tplclass; ?>">
		<?php if($this->countModules('breadcrumbs')): ?>
		<div class="breadcum clearfix">
			<jdoc:include type="modules" name="breadcrumbs" />
			<div class="clr"></div>
		</div>
		<?php endif; ?>
		<jdoc:include type="message" />
		<jdoc:include type="component" />
    </div>
	<?php if($showforms): ?>
	<div class="col-2 col-last">
		<div class="tpl-form clearfix">
			<jdoc:include type="modules" name="right-forms" />
		</div>
	</div>
	<?php endif; ?>
	<?php if($showright): ?>
	<div class="tpl-right col-1 col-last right-content">
		<jdoc:include type="modules" name="right-column" />
	</div>
	<?php endif; ?>
</div>
<?php if($showSections): ?>
<div class="wrapper tpl-padding clearfix" id="section-partner" >
   <div class="col-new">
		<jdoc:include type="modules" name="section-1" />
   </div>
	<div class="col-new">
		<jdoc:include type="modules" name="section-2" />
   </div>
	<div class="col-new end">
		<jdoc:include type="modules" name="section-3" />
   </div>
</div>
<?php endif; ?>
<div class="max-container tpl-padding max-lightbg bgguide" id="max-educate">
	<div class="wrapper" id="w-guide">
		<div class="col-2">
			
			<?php if($this->countModules('guidance-video')): ?>
			<div class="video-larg">
				<jdoc:include type="modules" name="guidance-video" />
			</div>
			<?php endif; ?>
			
		</div>
		<div class="col-2 col-last">
			
			<?php if($this->countModules('guidance-text')): ?>
			<div class="guide">
				<jdoc:include type="modules" name="guidance-text" />
			</div>
			<?php endif; ?>
		</div>
	</div>
</div>
<div class="max-container tpl-padding max-footer" id="max-footer">
	<div class="wrapper clearfix" id="footer-section">
		<footer class="footer clearfix">
			<div id="footer-main" class="clear-fix">
				<?php if($this->countModules('footer')): ?>
				  <jdoc:include type="modules" name="footer" />
				<?php endif; ?>
			
			</div>
			<div class="footer-bottom">
				<?php if($this->countModules('footer_text')): ?>
				  <jdoc:include type="modules" name="footer_text" />
				<?php endif; ?>
			</div>
		</footer>
	</div>
</div>


<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/jquery.validate.js"></script>
<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/jquery.easing.js"></script>
<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/jquery.reveal.js"></script>
<script type="text/javascript" src='<?php echo $templatepath; ?>/src/js/jquery.mobile.customized.min.js'></script>
<script type='text/javascript' src='<?php echo $templatepath; ?>/src/js/camera.min.js'></script>
<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/jquery.inputToggle.js"></script>
<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/init.js"></script>
<script>
	$(document).ready( function(){
		$('#slider-home').camera({
			height      : '300px',
			loader      : 'none',
			fx          : 'simpleFade',
			playPause   : false,
			pagination  : true,
			thumbnails  : false,
			time        : 2000
		});
		$("#main-nav > :last-child").addClass("end");
		close_popup=function(){		
			var fel=jQuery('#f_focus').html();
			jQuery('#backoverlay').hide();
			jQuery('#show_popup').hide();
			jQuery('#' + fel ).focus();		
		};
	});
</script>
<script>
	$(document).ready( function(){	
		var html = $('div#custom-page-heading > .heading2').clone(true);
		$('div#top-banner1').append(html);
		$('div#custom-page-heading').remove();
	});
</script>
<jdoc:include type="modules" name="debug" />
 
<!-- Tracking system by LeadTracker, www.leadtracker.dk -->
    <script type="text/javascript">
        (function () {
            var e = document.createElement('script');
            e.src = 'https://trk.leadtracker.dk/impl.js?tc=E4C8EC76HR1z';
            e.async = true;
            document.body.appendChild(e);
        }());
    </script>
<!-- End LeadTracker script -->

</body>
</html>
